/*
 * Copyright(c) 2018-? the original author[Wien(luweien@aliyun.com)] or authors.
 *
 */
package org.doll.it.nora.domain;

import java.util.List;

import org.doll.it.base.domain.DollDO;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 记录每个对象的最新一次提交
 * 
 * @author Wien(luweien@aliyun.com)
 *
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = true)
@Document
public class HeadDO extends DollDO {

	private static final long serialVersionUID = 371870065481506997L;

	/**
	 * 源对象Id
	 */
	@Indexed(unique = true)
	private Long originId;

	/**
	 * 最新一次的提交
	 */
	private Long commitId;

	/**
	 * 所有的提交，倒序排列
	 */
	private List<Long> commitIds;
}
